import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import {registerMicroApps, start} from "qiankun"
import router from './router/index.js'
const app = createApp(App)

app.use(router)
app.mount('#app')
registerMicroApps(
    [
        {
            name: "qiankun-subApp", // 子应用的名称
            entry: '//localhost:5555', // 子应用的入口地址
            container: '#qiankun-subApp', // 挂载的DOM元素
            activeRule: '/subHomePage' // 激活子应用的路由规则(子应用首次访问的路由地址)
        }
    ],
    {
        beforeMount(app){
            console.log("挂载前",app)
        },
        afterMount(app){
            console.log("挂载后",app);
        }
    }
)

start({
    prefetch: false, //取消预加载
    sandbox: { experimentalStyleIsolation: true }, //沙盒模式
})
